import Vue from "vue";
import Vant from "vant";
import "vant/lib/index.css";
import App from "./App.vue";
import "./registerServiceWorker";
import router from "./router";
import store from "./store";
import copyright from "./common/copyright";
import "./assets/iconfont/font_1465915_a37el0qa6z/iconfont.js";
// import "./assets/iconfont/font_1465915_a37el0qa6z/iconfont.css"; // iconfont 字体图片css
Vue.component("copyright", copyright);
import { Lazyload } from "vant";

import Http from "./utils/http"; // axios 封装 js
Vue.prototype.$http = Http;

import fastclick from "fastclick"; // 移动端300ms延迟解决
fastclick.attach(document.body);

import * as custom from "./utils/filters";
// 导出的是对象，可以直接通过 key 和 value 来获得过滤器的名和过滤器的方法
Object.keys(custom).forEach(key => {
  Vue.filter(key, custom[key]);
});
Vue.use(Vant);
Vue.use(Lazyload, {
  lazyComponent: true
});
Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
